package com.vip.mvc.akka;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;

/**
 * controller 只是负责转发, 性能都在service
 * Created by cloudy.xie on 17/2/16.
 */
public class ControllerActor  {
    private String controllName;
    private ActorRef controllerActor;

    public ControllerActor(ActorSystem actorSystem, String controllName){//, Map<String, ServiceActor> serviceActorMap) {
        this.controllName = controllName;

        Props props = Props.create(ControllerActorDef.class);
        controllerActor = actorSystem.actorOf(props, controllName);
    }

    public ActorRef getControllerActor() {
        return controllerActor;
    }

    public String getControllName() {
        return controllName;
    }

}
